package com.woniuxy.service.impl;

import com.woniuxy.dao.StudentsDao;
import com.woniuxy.entity.Students;
import com.woniuxy.service.StudentsServcie;

import java.util.List;

/**
 * @author 佘赛飞
 * @create 2021 -11 -08 7:06 PM
 */
public class StudentsServiceImpl implements StudentsServcie {
    StudentsDao studentsDao;

    public void setStudentsDao(StudentsDao studentsDao) {
        this.studentsDao = studentsDao;
    }

    @Override
    public void addStudents(Students students) {
      studentsDao.insertStudent(students);
    }

    @Override
    public void deleteStudents(int sid) {
        studentsDao.deleteStudents(sid);
    }

    @Override
    public List<Students> selectStudents() {
        return studentsDao.selectStudents();
    }

    @Override
    public void UpdateStudentsByCid(Students students) {
      studentsDao.UpdateStudentsByCid(students);
    }
}
